import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    //管理员登录
    {
      path: '/adminLogin',
      component: () => import('@/views/admin/AdminLogin.vue'),
    },
    {
      path: '/',
      component: () => import('@/views/home/Layout.vue'),
      children:[
        // 员工页面
        {
          path:'/emp',
          component:()=>import('@/views/emp/Employee.vue')
        },
        // 添加员工
        {
          path:'/addemp',
          component:() => import('@/views/emp/AddEmp.vue')
        },
        // 商家页面
        {
          path:'/bus',
          component:() => import('@/views/business/Business.vue')
        },
        // 店铺审核
        {
          path:'/auditShop',
          component:() => import('@/views/emp/AuditShop.vue')
        },


        /**
         * 菜品管理
         */
        {
          path:'/food',
          component:() => import('@/views/food/Food.vue')
        },
        {
          path:'/foodType',
          component:() => import('@/views/food/FoodType.vue')
        },




        /**
         * 店铺管理
         */

        // 店铺列表
        {
          path:'/shop',
          component:() => import('@/views/shop/Shop.vue')
        },

        // 店铺分类
        {
          path:'/classifyshop',
          component:() => import('@/views/shop/ClassifyShop.vue')
        },

        // 添加店铺
        {
          path:'/addshop',
          component:() => import('@/views/shop/AddShop.vue')
        }
      ]
    },
    // 商家注册
    {
      path:'/busRegist',
      component:() => import('@/views/business/Regist.vue')
    },
    // 商家登录
    {
      path:'/busLogin',
      component:() => import('@/views/business/Login.vue')
    },
  ],
})

export default router
